	#Title: Programa 24				Filename: 24.s
	#Author: Chipres Castellanos Ana Maria          Date: 23 /mayo / 2017
	#Descripcion:
	#Hacer un programa que genere numeros aleatorios
	
	.arch armv6
	.eabi_attribute 27, 3
	.eabi_attribute 28, 1
	.fpu vfp
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 1
	.eabi_attribute 18, 4
	.file	"24.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Ingrese la cantidad de numeros aleatorios que desea"
	.ascii	" generar\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"%d \000"
	.text
	.align	2
	.global	main
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	stmfd	sp!, {fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r0, #0
	bl	time
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	srand
	ldr	r0, .L4
	bl	puts
	sub	r3, fp, #20
	ldr	r0, .L4+4
	mov	r1, r3
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	bl	rand
	mov	r3, r0
	ldr	r2, .L4+8
	smull	r1, r2, r2, r3
	mov	r1, r2, asr #5
	mov	r2, r3, asr #31
	rsb	r2, r2, r1
	mov	r1, #100
	mul	r2, r1, r2
	rsb	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r0, .L4+12
	ldr	r1, [fp, #-16]
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L3
	sub	sp, fp, #4
	@ sp needed
	ldmfd	sp!, {fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.word	1374389535
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Raspbian 4.9.2-10) 4.9.2"
	.section	.note.GNU-stack,"",%progbits
